//silly-datetime这个库是操作时间的
var sd=require('silly-datetime');
var http=require('http');

var app=http.createServer(function(req,res){
    res.writeHead(200,{'Content-Type':'text/html;charset=utf-8'});
    var currDate= sd.format(new Date(),'YYYY-MM-DD HH:mm:ss');
    res.write(currDate);
    res.end();
});
app.listen(8002);